package com.fivium.bpd.editor;

import java.awt.BorderLayout;

import javax.swing.JEditorPane;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.text.PlainDocument;

import jsyntaxpane.DefaultSyntaxKit;

public class XMLPanel extends JPanel
{

  /**
   * Create the panel.
   */
  public XMLPanel()
  {
    setLayout(new BorderLayout(0, 0));
    
    DefaultSyntaxKit.initKit();
    
    final JEditorPane xmlEditor = new JEditorPane();
    xmlEditor.setEnabled(false);
    xmlEditor.setEditable(false);
    
    final JScrollPane xmlEditorScrollPane = new JScrollPane(xmlEditor);
    add(xmlEditorScrollPane, BorderLayout.CENTER);
    
    DefaultSyntaxKit.initKit();
    
    xmlEditor.setContentType("text/xml");
    xmlEditor.setText("<BUSINESS_PROCESS_DEFINITION>\n  <SHORT_NAME>BPD Test</SHORT_NAME>\n</BUSINESS_PROCESS_DEFINITION>");
    xmlEditor.getDocument().putProperty(PlainDocument.tabSizeAttribute, 2);
  }
  
  

}
